<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

</head>

<body>
	<div class="header_top">
		<div class="w1200">
			<div class="h_t_l">
				<div class="login_l">
					<span>欢迎${user.username}来到开心买!</span> <a class="a_login" href="${project_name}/login.jsp">[登录]</a>
					<span class="line"></span> <a class="" href="${project_name}/register.jsp">[注册]</a>
				</div>
			</div>
			<!-- 以下div需要登录登录才能显示 -->
			<div class="h_t_r">
				<ul>
					<li><a href="${project_name}/cart/display">购物车</a> <span class="line"></span></li>
					<li><a  href="${project_name}/front_user/find?id=${user.id}">个人资料</a> <span class="line"></span></li>
					<li><a href="${project_name}/order/display">我的开心买</a> <span class="line"></span></li>

					<c:if test="${sessionScope.user.permission  == '管理员'}">
						<!-- 以下是管理员权限显示 -->
						<li><a href="${project_name}/manage/index.jsp">进入后台管理</a> <span class="line"></span></li>
					</c:if>

				</ul>
			</div>
		</div>
	</div>
</body>
</html>
